{"componentChunkName":"component---src-templates-blog-post-tsx","path":"/posts/product-folder-evolution/","result":{"data":{"markdownRemark":{"html":"<p>The Product Folders were rehauled from a UX Perspective going from a multi-tab to a single-page experience with a new look and feel.  From a development standpoint we also reworked the services and moved to a new technology stack on the front-end to make our project more agile and involve more Design resources to make code changes.</p>\n<p>This was a large project requiring close collaboration with the back-end team as well as our UX Design team.</p>\n<p>As a project it was complex because TI has a portfolio of over 80,000 products, each with its own associated specifications, training materials, as well as primary and secondary associated parts.</p>\n<h4>Before</h4>\n<p><img src=\"/FA-en.jpg\" alt=\"Before changes\" title=\"Tabbed Product Folders - before\"></p>\n<h4>After</h4>\n<p><img src=\"/productDesktop.jpg\" alt=\"After changes\" title=\"Tabbed Product Folders - before\"></p>\n<p>View an example page: <a href=\"https://www.ti.com/product/OPA333\">here</a></p>\n<h2>Role</h2>\n<p>As a front-end developer, I contributed production code to implement the UI based on the business logic and UX requirements. I helped to wire up the controller with the service using <code>Springboot</code> and worked closely with the back-end team to coordinate when business logic was appropriate on the front-end or the back-end. I helped segment the initial <code>Thymeleaf</code> into fragments, broken out logically depending on the UI requirements.</p>\n<p>I contributed to many reusable web components utilized across the page and targeted for other applications.  Since each component is meant for use globally, it went through an approval process across, business, development, and design.</p>\n<h2>My contributions to requirements</h2>\n<ul>\n<li>Localization for Chinese and Japanese</li>\n<li>Work with Metrics team and implement metrics tracking (GA)</li>\n<li>Conform UI to Search engine optimization initiatives</li>\n<li>Meet TI branding and guidelines</li>\n<li>Contribute to reusable web components</li>\n<li>Applied business logic requirements on Thymeleaf templates</li>\n<li>Integrated unit tests</li>\n<li>Supported by IE11, Firefox and Chrome</li>\n<li>Build out base HTML connected to JSON data from services provided by another team</li>\n<li>Write integration tests using JSOUP and JUnit</li>\n<li>Contributed to 8 patterns/web components providing SASS for shadow DOM</li>\n</ul>\n<h2>Example of deliverables</h2>\n<h3>Implementation of the <code>sticky-chapter-nav</code></h3>\n<p>View live: <a href=\"https://www.ti.com/product/INA121\">here</a></p>\n<p>The <code>sticky-chapter-nav</code> is a web component I worked on that required animating into view when sticky is activated.   I utilized CSS transitions in conjunction with the component’s <code>@state</code> in order to achieve the effect.  </p>\n<p>A challenge came with the requirement of supporting IE11, where I needed to make adjustments to the <code>scrollTo</code> function in order for IE11 to work correctly.</p>\n<p>In addition, one of the design requirements is that there is a header above the <code>sticky-chapter-nav</code> that varies in content depending if the product is available for Order.  By using <code>slots</code> on <code>StencilJS</code> we were able to control that content and keep business logic on the <code>Thymeleaf</code> layer.</p>\n<p>Another challenge was correctly updating which link is active based on when the customer has scrolled past the anchor.  I needed to work with the UX Team in order to define when exactly the link and make those changes to the code.</p>\n<h4>Running into bugs</h4>\n<p>One bug that was discovered during testing was that in some cases, the <code>sticky-chapter-nav</code> would be missing links.  </p>\n<p><strong>Web Component race conditions</strong>\nI encountered a race condition as I was tasked to fix a bug that caused the <code>sticky-chapter-nav</code> to not populate with all of its chapter-nav links correctly.</p>\n<h4>Isolating the issue</h4>\n<p>Using Chrome Dev Tools with a throttled network and breaking on the render code for the web component, I isolated the moment the <code>sticky-chapter-nav</code> was querying for <code>chapter-nav-anchors</code> on the page and populating them as links. I determined that the <code>chapter-nav-anchors</code> did not exist in the DOM when the <code>sticky-chapter-nav</code> was rendered, given the asynchronous nature of how StencilJS web components are rendered/hydrated as the DOM is completing its page load.</p>\n<p>The <code>sticky-chapter-nav</code> was querying for the <code>chapter-nav-anchors</code> but during slow page loads, the <code>sticky-chapter-nav</code> would render first before the <code>chapter-nav-anchors</code> is on the DOM, causing the <code>sticky-chapter-nav</code> to fail in populating the link.</p>\n<h4>Solution</h4>\n<p>The solution we ended up implementing was to listen for the document page load event during its component lifecycle when it is finished loading. This ensured that the DOM completely rendered before looking for the <code>chapter-nav-anchors</code>.</p>","frontmatter":{"title":"Server Rendered Product Page","date":null,"summary":"Rehaul the Tabbed based Product Pages to a single page experience using a new framework and onboard other front-end designers to contribute.","subtitle":"Java Based Web App - Front End Developer","tagsDev":["Spring Boot 2","Thymeleaf","Web Components","StencilJS","Typescript","JSX","SASS","JSOUP","JUNIT testing","Lighthouse","Metrics"],"tagsUI":["SEO","Localization"],"previewDesktop":"productDesktop.jpg"}}},"pageContext":{"slug":"/posts/product-folder-evolution/"}},"staticQueryHashes":["2651704696"]}